<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<script type="text/javascript" src="xheditor-1.1.14/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js"></script>
 <script type="text/javascript" src="com.attilax/core/core.js"></script>
  <script type="text/javascript" src="../com.attilax\jsbridge\jsb_v10q55.js"></script>
 
 <link rel="stylesheet" type="text/css" href="com.atilax.frmwk/bootstrap/css/bootstrap.css"/>
</head>

<body>
<table width="100%" border="1" class="table table-striped">
  <tr>
    <td width="200">title</td>
    <td><label for="title"></label>
    <input name="title" type="text" id="title" value="tttt" size="100" style="width:800px;" /></td>
  </tr>
  <tr>
    <td width="200">txt</td>
    <td><p>
      <textarea name="content" cols="100" rows="20" class="xheditor" style="height:450px; width:900px;" id="content">
..xxx
aaa
bbb</textarea>
    </p></td>
  </tr>
  <tr>
    <td colspan="2"> tag
      <input type="text" name="title2" id="title2" /> 
      &nbsp;&nbsp;&nbsp;
      <input name="checkbox" type="checkbox" id="checkbox" value="csdn" checked>
      csdn
 
  <input name="checkbox" type="checkbox" id="checkbox" value="cnblogs" checked>
        blogcns
        <input name="checkbox" type="checkbox" id="checkbox" value="sina" checked>
        sina
        
         <input name="checkbox" type="checkbox" id="checkbox" value="qzone">
        qzone
        
         <input name="checkbox" type="checkbox" id="checkbox" value="sohu" checked>
        sohu
   </td>
  </tr>
  <tr>
    <td colspan="2"><input type="button" name="button" id="button" value="按钮" class="btn btn-success btn-block" onClick="clickx()" />
    <script>
    function clickx()
	{
		var el=$("input[name='checkbox']:checked");
		    var dropIds ="nonex";
                   el.each(function(){  
						
                        dropIds=dropIds+","+($(this).val());  
                    });  
		
		var ckbox_val=dropIds;
		alert("select pubbers is:: "+ckbox_val);
		try{
		var jsbrj=new	AtiJsBridge();
		jsbrj.method="post";
		var para={};
		para.tit=$("#title").val();
		para.txt=$("#content").val();
		para.sites=dropIds;
		para.$method="com.attilax.cmsPoster.BlogPubber.startOpenBlogs";
		jsbrj.exe(para,function(data){
			console.log(data);
			
		});
			//mycallJava("submitx",$("#title").val(),$("#content").val(),dropIds);
		}catch(e)
		{
			alert(e);
		}
		
	}
//	$(window.frames["iframeChild"].document)
window.setTimeout(function()
{
	//alert($().html("haha"));
	//window.frames["xhe0_iframe"].document.body.innerHTML="inn";
},3000);
window.setInterval(function()
{
	try{
			var txt=$(document.getElementById('xhe0_iframe').contentWindow.document.body).html() ;
			//alert(txt);
			//window.frames["xhe0_iframe"].document.body.innerHTML;
			//document.frames('xhe0_iframe')
			//jeig ff hamyer err
		//	var win=window.frames["xhe0_iframe"];  //jeig ie ff dou ok
		//	win.contentWindow.document   jeig only ff  ,ie error
		var win=$("#xhe0_iframe").contents();
		var win_raw=win[0];
		//var doc=win_raw.document;
			$("p",win_raw).each(function(index,e)
			{
				var t=$(e).text();
				if(t.length>0)
				{
					$("#title").val($(e).text());
					return false; 
				}
			});
	}catch(e)
	{
		showErr(e);}
//	var a=txt.split("<br>");
},5000);
//alert(document.title);

 //   alert('\'aaa');
    </script>    </td>
  </tr>
</table>
</body>
</html>
